Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

remove direct helium-program-library dep in favor of helium-anchor-gen #575

Merged
merged 4 commits into from
Feb 2, 2024

Conversation

lthiery
Copy link
Contributor

@lthiery lthiery commented Jul 19, 2023

I don't know if this is a good idea, but I had success doing this on a personal project.

Basically what this does is depend on helium-anchor-gen (my crate I made this weekend based on a tweet from Noah about anchor-gen) instead of helium-program-library. The reason to not like HPL is because it has the misfortune of depending on solana-program-library which pins a bunch of dependencies to patch releases. I think in some effort to workaround this, HPL contains git submodules which I think is what triggers painfully long re-compile times when one must depend on it.

Anyway, the way this works is thanks to anchor-gen which re-generates Rust structs based on IDL files which are the Anchor build output from helium-program-library. So if you're familiar with protobufs, it's as if the Rust code is generating a .proto file and then we generate the Rust code back from the .proto. A bit circular, but au contraire, it breaks the circle and we are no longer infected by the point release pinning of the solana-program-library.

@bbalser bbalser closed this Nov 9, 2023
@lthiery lthiery deleted the lthiery/helium-anchor-gen branch November 9, 2023 18:57
@maplant maplant restored the lthiery/helium-anchor-gen branch January 29, 2024 20:13
@maplant maplant reopened this Jan 29, 2024
@maplant maplant marked this pull request as ready for review January 29, 2024 21:14
@maplant maplant merged commit 21515b1 into main Feb 2, 2024
1 check passed
@maplant maplant deleted the lthiery/helium-anchor-gen branch February 2, 2024 19:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants